const Layout = () => import("@/layout/index.vue");

export default [
  {
    path: "/login",
    name: "Login",
    component: () => import("@/views/login/index.vue"),
    meta: {
      title: "登录",
      showLink: false,
      rank: 101
    }
  },
  {
    path: "/shop",
    name: "shop",
    redirect: "/shop/shopList",
    component: () => import("@/views/shop/index.vue"),
    meta: {
      title: "商城",
      showLink: false,
      rank: 101
    },
    children: [
      {
        path: "shopList",
        name: "shopList",
        component: () => import("@/views/shop/cartList/index.vue"),
        meta: {
          title: "买车",
          showLink: false,
          rank: 101
        }
      },
      {
        path: "cartDetail",
        name: "cartDetail",
        component: () => import("@/views/shop/cartDetail/index.vue"),
        meta: {
          title: "商品详情",
          showLink: false,
          rank: 101
        }
      },
      {
        path: "news",
        name: "news",
        component: () => import("@/views/shop/news/index.vue"),
        meta: {
          title: "新闻",
          showLink: false,
          rank: 101
        }
      },
      {
        path: "news/detail",
        name: "newsDetail",
        component: () => import("@/views/shop/newsDetail/index.vue"),
        meta: {
          title: "新闻详情",
          showLink: false,
          rank: 101
        }
      }
    ]
  },
  {
    path: "/redirect",
    component: Layout,
    meta: {
      title: "加载中...",
      showLink: false,
      rank: 102
    },
    children: [
      {
        path: "/redirect/:path(.*)",
        name: "Redirect",
        component: () => import("@/layout/redirect.vue")
      }
    ]
  },
  {
    path: "/chat",
    name: "chat",
    component: () => import("@/views/chat/index.vue"),
    meta: {
      title: "chat",
      showLink: false,
      rank: 101
    }
  },
  {
    path: "/livekit",
    name: "liveKit",
    component: () => import("@/views/livekit/index.vue"),
    meta: {
      title: "liveKit",
      showLink: false,
      rank: 101
    }
  }
] as Array<RouteConfigsTable>;
